var express = require('express');
var router = express.Router();

// middleware
var checkPermission = require('../middleware/checkPermisson');
router.use(checkPermission);

// routers
var promoterRouter = require('./promoter/promoter');
var usersRouter = require('./promoter/users');
var companyRouter = require('./company/company');
var companyUserRouter = require('./company/users');
router.use('/promoter/promoter', promoterRouter);
router.use('/promoter/users', usersRouter);
router.use('/company/company', companyRouter);
router.use('/company/users', companyUserRouter);


/* GET users listing. */
router.get('/', function(req, res, next) {
    res.send(__dirname + __filename);
});

module.exports = router;
